﻿using System;
using System.Data.Common;

namespace MyLib {
	/// <summary>
	/// 
	/// </summary>
	public interface ITransaction : IDisposable {
		/// <summary>
		/// 
		/// </summary>
		DbConnection Connection { get; }

		/// <summary>
		/// 
		/// </summary>
		DbTransaction Transaction { get; }

		/// <summary>
		/// 
		/// </summary>
		void Commit();

		/// <summary>
		/// 
		/// </summary>
		void Rollback();

		/// <summary>
		/// 
		/// </summary>
		void Close();

		/// <summary>
		/// 
		/// </summary>
		bool Closed { get; }
	} // end of ITransaction.
}
